#pragma once

#include "reflect/ClassField.h"

#include <string>

class ClassObject
{
  private:
    std::string m_className;

  public:
    ClassObject();
    virtual ~ClassObject();

    ClassObject(const std::string& classname);

  public: // 类
    void               set(const std::string& className);
    const std::string& get() const;

  public: // 类域成员变量
    ClassField* getClassField(const std::string& className, int pos);
    ClassField* getClassField(const std::string& className,
                              const std::string& fieldName);
    ClassField* getClassField(int pos);
    ClassField* getClassField(const std::string& fieldName);

    template <typename T>
    void setField(const std::string& fieldName, const T& fieldValue);
    void setField(const std::string& fieldName, const char* fieldValue);

    template <typename T>
    void getField(const std::string& fieldName, T& fieldValue);

    int getFieldCount();

  public: // 类方法
    void classMethodCall(const std::string& methodname);
    ClassMethod * getClassMethod(int pos);

  public:
    virtual void show() = 0;
};
